import Vue from 'vue'
import Router from 'vue-router'
// import Home from '../pages/home/Home.vue'
// import Category from '../pages/category/Category.vue';
// import Cart from '../pages/cart/Cart.vue';
// import Profile from '../pages/profile/Profile.vue';

Vue.use(Router)

const Home = () => import('pages/home/Home.vue');
const Category = () => import('pages/category/Category.vue');
const Cart = () => import('pages/cart/Cart.vue');
const Profile = () => import('pages/profile/Profile.vue');

const routes = [
  {
    path: '',
    redirect: "/home"
  },
  {
    path: "/home",
    component: Home
  },
  {
    path: "/category",
    component: Category
  },
  {
    path: "/cart",
    component: Cart
  },
  {
    path: "/profile",
    component: Profile
  },
]

export default new Router({
  routes: routes,
  mode: 'history'
})
